﻿using DapperExtensions;
using Nova_Common.Extend;
using Nova_DAL;
using Nova_MOD;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Nova_BLL
{
    public class TAddStorage_ListBll
    {
        TAddStorage_ListDal dal = new TAddStorage_ListDal();

        public TAddStorage_List GetByStockNo(string stockNo)
        {
            var predicate = Predicates.Field<TAddStorage_List>(t => t.StockNo, Operator.Eq, stockNo);
            return dal.GetByField(predicate);
        }

        public bool InsertEntity(TAddStorage_List entity)
        {
            return !dal.Insert(entity).IsEmpty();
        }

        public bool UpdateEntity(TAddStorage_List entity)
        {
            return dal.Update(entity);
        }
    }
}
